package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.dao.AdvSpaceDao;
import com.jeff.tianti.cms.dto.AdvSpaceQueryDTO;
import com.jeff.tianti.cms.entity.AdvSpace;
import com.jeff.tianti.cms.entity.Article;
import com.jeff.tianti.common.entity.PageModel;
import com.jeff.tianti.common.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Dictionary;
import java.util.List;

@Service
public class AdvSpaceService extends CommonService<AdvSpace, String> {
    @Autowired
    private AdvSpaceDao advSpaceDao;

    @Autowired
    public void setAdvSpaceDao(AdvSpaceDao advSpaceDao) {
        super.setCommonDao(advSpaceDao);
    }

    public PageModel<AdvSpace> queryAdvSpacePage(AdvSpaceQueryDTO advSpaceQueryDTO) {
        return this.advSpaceDao.queryAdvSpacePage(advSpaceQueryDTO);
    }

    public int updateSelective(AdvSpace advSpace) {
        return advSpaceDao.updateSelectiveById(advSpace);
    }

    public List<AdvSpace> findByDicCode(String dicCode) {
        return advSpaceDao.findByDicCode(dicCode);
    }
}
